import request from '@/utils/request'

// 查询库存损耗列表
export function listStockLoss(query) {
  return request({
    url: '/business/stock/loss/list',
    method: 'get',
    params: query
  })
}

// 查询库存损耗详细
export function getStockLoss(lossId) {
  return request({
    url: '/business/stock/loss/' + lossId,
    method: 'get'
  })
}

// 新增库存损耗
export function addStockLoss(data) {
  return request({
    url: '/business/stock/loss',
    method: 'post',
    data: data
  })
}

// 修改库存损耗
export function updateStockLoss(data) {
  return request({
    url: '/business/stock/loss',
    method: 'put',
    data: data
  })
}

// 删除库存损耗
export function delStockLoss(lossId) {
  return request({
    url: '/business/stock/loss/' + lossId,
    method: 'delete'
  })
}

// 导出库存损耗
export function exportStockLoss(query) {
  return request({
    url: '/business/stock/loss/export',
    method: 'post',
    params: query
  })
}

